package com.atguigu.jxc.dao;

import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.Goods;
import com.atguigu.jxc.entity.Supplier;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @description 商品信息
 */
public interface GoodsDao {




    String getMaxCode();


    Page<Goods> listInventory(@Param("offSet") Integer offSet,@Param("pageRow") Integer pageRow, @Param("codeOrName") String codeOrName,@Param("goodsTypeId") Integer goodsTypeId);

    Page<Goods> getNoInventoryQuantity(@Param("nameOrCode") String nameOrCode);

    Page<Goods> getHasInventoryQuantity(@Param("nameOrCode") String nameOrCode);

    void updatePriceAndQuantity(Integer goodsId, Integer inventoryQuantity, double purchasingPrice);

    Page<Goods> listSelectAllGoods(String goodsName, Integer goodsTypeId);

    void saveGoods(Goods goods);

    void updateGoods(Goods goods);

    void deleteGoods(Integer goodsId);

    Goods getGoodsById(Integer goodsId);
}
